{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['bread', 'milk', 'eggs', 'apple']\n"
     ]
    }
   ],
   "source": [
    "shopping = [\"bread\",\"milk\", \"eggs\"]\n",
    "shopping.append(\"apple\")\n",
    "print(shopping)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['bread', 'milk', 'eggs', 'apple']\n"
     ]
    }
   ],
   "source": [
    "shopping = []\n",
    "shopping.append('bread')\n",
    "shopping.append('milk')\n",
    "shopping.append('eggs')\n",
    "shopping.append('apple')\n",
    "print(shopping)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['bread', 'milk', 'ham', 'eggs', 'apple']\n"
     ]
    }
   ],
   "source": [
    "shopping.insert(2, 'ham') \n",
    "print(shopping)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['bread', 'milk', 'ham', 'eggs', 'apple', 'coffee', 'orange']\n"
     ]
    }
   ],
   "source": [
    "new_shopping = ['coffee', 'orange']\n",
    "shopping.extend(new_shopping) \n",
    "print(shopping)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['bread', 'milk', 'eggs', 'apple', 'coffee', 'orange']\n"
     ]
    }
   ],
   "source": [
    "shopping.remove('ham')\n",
    "print(shopping)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['bread', 'milk', 'apple', 'coffee', 'orange']\n"
     ]
    }
   ],
   "source": [
    "shopping.pop(2)\n",
    "print(shopping)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['apple', 'bread', 'coffee', 'milk', 'orange']\n"
     ]
    }
   ],
   "source": [
    "shopping.sort()\n",
    "print(shopping)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['orange', 'milk', 'coffee', 'bread', 'apple']\n"
     ]
    }
   ],
   "source": [
    "shopping.sort(reverse = True)\n",
    "print(shopping)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "shopping.index('coffee')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
